package com.liyunc.socket.rpc.remote.impl;

import com.liyunc.socket.rpc.remote.RemoteService;

import java.text.SimpleDateFormat;
import java.util.Date;

public class RemoteServiceImpl implements RemoteService {
    @Override
    public String getCurrentTime(String name, String info) {
        SimpleDateFormat sdf = new SimpleDateFormat("MM-dd HH:mm:ss:ssss");
        String time = sdf.format(new Date(System.currentTimeMillis()));
        return String.format("%s%s:%s", "[RPC远程调用]", "[" + time + "]", info);
    }
}
